package com.jjb.www.ui.adapter;

import android.content.Context;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.jjb.www.R;
import com.jjb.www.app.AppAdapter;

/**
 *    author : Android CRG
 *    github : https://github.com/getActivity/AndroidProject
 *    time   : 2018/11/05
 *    desc   : 可进行拷贝的副本
 */
public final class DayAdapter extends AppAdapter<String> {

    public DayAdapter(Context context) {
        super(context);
    }

    @NonNull
    @Override
    public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        return new ViewHolder();
    }

    private final class ViewHolder extends AppAdapter<?>.ViewHolder {
        private final TextView mTvWhichClass;
        private final RecyclerView mRecyclerView;
//        private final PunchDetailAdapter adapter;
        private ViewHolder() {
            super(R.layout.item_punch);
            mTvWhichClass = findViewById(R.id.tv_which_class);
            mRecyclerView = findViewById(R.id.rv_punch);
        }

        @Override
        public void onBindView(int position) {
            mTvWhichClass.setText("第" + (position + 1) + "节课");

        }
    }
}